package org.example.controller;

import org.reactivestreams.Publisher;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.locks.AbstractQueuedSynchronizer;
import java.util.concurrent.locks.ReentrantLock;

@RestController
public class GoodsController {
    @GetMapping("/goods/buy/{name}/{count}")
    public ResponseEntity<String> buy(@PathVariable("name") String name, @PathVariable("count") Integer count) {
        return ResponseEntity.ok(String.format("购买%d份%s", count, name));
    }
}
